home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
twi12.zip
/
TWIDEMO2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-08-05
|
4KB
|
97 lines
Program TWIDEMO2;
(***********************************************************************)
(** Text Windowing Interface Copyright David Pabst 1992 **)
(** All Rights Reserved **)
(** Compuserve: 76547,2643 Relaynet: Pascal to David Pabst **)
(** **)
(** You may use, test, and\or develop software that uses TWI for **)
(** up to 1 month (31 days). You should not release software that **)
(** uses TWI before your register. If you do, your first registration **)
(** for that software must be put towards registering TWI. Either way**)
(** you must register after 31 days of use and demoing TWI. **)
(** TWI is shareware. YOU must register if this **)
(** software meets your needs. Registration is $15 (US) Check or **)
(** money order. **)
(** **)
(** $15 - David Pabst, 18 McAdams Road, Framingham, MA 01701, USA **)
(***********************************************************************)
Uses Crt,TWI2;
var
Top, Bottom, J,
A, B , C , D , E , F , G , H , I : String;
Option, Fillchar : Char;
X, Y : Integer;
Done : Boolean;
Begin (* Twi Demo 2 *)
DefaultColors; (* Set Colors To Defaults *)
Top := ('TWI Demo 2 Copyright 1991 David Pabst & DSP Software All Rights Reserved ');
Bottom := ('ESC Exit C Cool Display');
Fillchar := ('▒');
DrawBackGround(Top,Bottom); (* Set The back ground up *)
A:=('TWIDEMO2.EXE shows that'); (* Shows a sample window *)
B:=('multiple windows can be');
C:=('opened at one time.');
D:=('TWIDEMO1 can scroll windows');
DrawSmallWindow(A,B,C,D,25,8); (* Draw a small window at 25,8 *)
TextColor(4); (* Text Color red *)
WriteXy(34,13,' Press Return '); (* Tell User To Press Return *)
WaitForReturn; (* Wait Until Return Is Pressed *)
ClearSmallWindow(25,8); (* Clear Window After REturn *)
Done := false;
FGC := 5;
BGC := 2;
LC := 4;
DrawSmallWindow(' Press C or ESC ',' C Cool Display',' ESC Exit','',25,8);
DefaultColors;
Repeat (* Until... *)
option := readkey; (* Get input from Keyboard *)
option := upcase(option);
case option of
#27 : Begin (* If Escape is pressed *)
TwiClose; (* Close TWI Down *)
end;
'C' : Begin (* cool demo windowing demo *)
a:=('TWI Copyright David Pabst'); (* Init window vars *)
b:=('TWI Copyright DSP Software');
c:=('All Rights Reserved');
d:=('Press a key to stop output.');
e:=('Line 5');
f:=('Line 6');
g:=('Line 7');
h:=('Line 8');
i:=('Line 9');
j:=('Line 10');
Bottom := ('Pressing a Key Stops Output & Returns to Main Environment');
ChangeStatusLine(Top,Bottom); (* Change status lines *)
Done := false;
Window(1,2,80,24);
Repeat
Begin
Randomize; (* Randomize computer *)
delay(125); (* Delay 125 Milliseconds *)
drawmediumwindow(a,b,c,d,e,f,(random(30)),(random(16)));
drawsmallwindow(a,b,c,d,(random(45)),(random(17)));
drawlargewindow(a,b,c,d,e,f,g,h,i,j,(random(25)),(random(13)));
End;
Until keypressed; (* Until Keypressed *)
Bottom := ('ESC Exit C Cool Display'); (* Change status line back *)
Window(1,1,80,25);
DrawBackGround(top,bottom); (* Reset BackGround; *)
FGC := 5;
BGC := 2;
LC := 4;
DrawSmallWindow(' Press C or ESC ',' C Cool Display',' ESC Exit','',25,8);
DefaultColors;
End;
End;
Until Done;
End. (* Twi Demo 2 *)